package com.atguigu.dao;

import com.atguigu.base.BaseDAO;
import com.atguigu.entity.RolePermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @PACKAGE_NAME: com.atguigu.dao
 * @CLASSNAME: RolePermissionDAO
 * @AUTHOR: zhangsan
 * @DATE: 2024/5/1 21:05
 * @SINCE 17.0.7
 * @DESCRIPTION: RolePermissionDAO
 */
public interface RolePermissionDAO extends BaseDAO<RolePermission> {
    /**
     * 通过角色id查询该角色拥有的权限
     * @param roleId
     * @return
     */
    List<Long> findPermissionIdsByRoleId(@Param("roleId") Long roleId,
                                         @Param("isDeleted") Integer isDeleted);


    Integer updateIsDeletedByRoleIdAndPermissionId(RolePermission rolePermission);
}
